package cn.whitecao.agent.plugin.jdbc;

import cn.whitecao.agent.core.plugin.PluginDefinition;
import cn.whitecao.agent.core.plugin.PluginMatcherRule;
import cn.whitecao.agent.plugin.jdbc.handler.JdbcInterceptor;

import java.util.Collections;
import java.util.List;

/**
 * @author : BashfulHuang
 **/
public class JdbcPluginDefinition implements PluginDefinition {

    @Override
    public String getName() {
        return "MYSQLPlugin";
    }

    @Override
    public Integer getVersion() {
        return 1;
    }

    @Override
    public String getType() {
        return "agent";
    }

    @Override
    public List<PluginMatcherRule> getMatcherRuleList() {
        return Collections.singletonList(new JdbcMatcherRule());
    }

    @Override
    public Class<?> getInterceptorHandlerClass() {

        return JdbcInterceptor.class;
    }
}
